//#include <iostream>
//
//class BinInsert {
//public:
//    int binInsert(int n, int m, int j, int i) {
//        m = m << j;
//        return m | n;
//    }
//};


#include <iostream>
#include <vector>
using namespace std;

bool check(int n)
{
    for (int i = 2; i < n; i++)
    {
        if (n % i == 0)
            return false;
    }

    return true;
}

int main()
{
    int n = 0;
    cin >> n;
    vector<int> nums;
    for (int i = 1; i < n; i++)
    {
        if (check(i))
        {
            nums.push_back(i);
        }
    }

    int left = 0, right = nums.size() - 1;
    int nums1 = 0, nums2 = 0;
    while (left <= right)
    {
        if (nums[left] + nums[right] < n)
        {
            left++;
        }
        else if (nums[left] + nums[right] > n)
        {
            right--;
        }
        else
        {
            nums1 = nums[left], nums2 = nums[right];
            left++;
        }
    }

    cout << nums1 << endl;
    cout << nums2 << endl;
    return 0;
}


///////////////////////////////////////////

#include <iostream>
#include <string>
using namespace std;

const string src("%100");

int main()
{
    string str;
    getline(cin, str);

    for (int i = 0; i < str.size(); i++)
    {
        if (str[i] == ' ')
        {
            str.erase(i, 1);
            str.insert(i, src);
        }
    }

    cout << str << endl;
    return 0;
}


//

#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int n = 0, target = 0;
    cin >> n >> target;
    vector<int> nums;
    for (int i = 0; i < n; i++)
    {
        int tmp = 0;
        cin >> tmp;
        nums.push_back(tmp);
    }

    int left = 0, right = nums.size() - 1;
    while (left < right)
    {
        int mid = left + (right - left) / 2;
        if (nums[mid] < target)
        {
            left = mid + 1;
        }
        else
        {
            right = mid;
        }
    }

    if (nums[right] < target)
        cout << (n + 1) << endl;
    else
        cout << (right + 1) << endl;
    return 0;
}